package com.panshi.tools;

import eu.bitwalker.useragentutils.UserAgent;

import javax.servlet.http.HttpServletRequest;

public class RequestAnalysis {


    /**
     * 获取请求的IP地址
     * @param request
     * @return
     */
    public static String getBrowser(HttpServletRequest request) {

        UserAgent
                userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent"));

        return  userAgent.getBrowser().getName();

    }

}
